<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include::header"></head>
<link  th:href="@{/js/plugins/layui/css/layui.css}" rel="stylesheet">
<script src="/js/plugins/layui/layui.js"></script>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="signupForm">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">账户名称：</label>
                                <div class="col-sm-8">
                                    <input id="username" name="username" th:value="${obj.username}" class="form-control valid" type="text" aria-required="true" aria-invalid="false" >
                                    <input id="userId" name="userId" th:value="${obj.userId}" type="hidden" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户名称：</label>
                                <div class="col-sm-8">
                                    <input id="name" name="name" th:value="${obj.name}" class="form-control error" type="text" aria-required="true" aria-invalid="true" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户邮箱：</label>
                                <div class="col-sm-8">
                                    <input id="email" name="email" th:value="${obj.email}" class="form-control" type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">手机号：</label>
                                <div class="col-sm-8">
                                    <input id="mobile" name="mobile" th:value="${obj.mobile}" class="form-control" type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">出生日期：</label>
                                <div class="col-sm-8">
                                    <input id="birth" name="birth" th:value="${#dates.format(obj.birth, 'yyyy-MM-dd')}" readonly="readonly" class="form-control" type="text">
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户性别：</label>
                                <div class="col-sm-8">
                                    <label class="radio-inline">
					                <input type="radio" th:checked="${obj.sex==1}? 'true' : 'false' " value="1" id="optionsRadios1" name="sex">男</label>
					                <label class="radio-inline">
					                <input type="radio" th:checked="${obj.sex==2}? 'true' : 'false' "  value="2" id="optionsRadios2" name="sex">女</label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户状态：</label>
                                <div class="col-sm-8">
                                    <label class="radio-inline">
					                <input type="radio" th:checked="${obj.status==0}? 'true' : 'false' "   value="0"  name="status">正常</label>
					                <label class="radio-inline">
					                <input type="radio" th:checked="${obj.status==1}? 'true' : 'false' "   value="1"  name="status">禁用</label>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户角色：</label>
                                <div class="col-sm-8">
                                <label th:each="role:${roles}" class="checkbox-inline">
									<input th:checked="${#lists.contains(obj.roleIds,role.roleId)}"    name="roleIds" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}">
								</label>
                                 </div>
                            </div>
                            
                            <div class="form-group">
                                <div class="col-sm-8 col-sm-offset-3">
                                    <button class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script type="text/javascript" src="/js/business/system/user/edit.js"></script>
</body>

</html>
